<template>
  <div class="home">
    <com1 :com1Data="com1Data" @emitcom1="emitcom1"></com1>
    <com2 :val="val"></com2>
  </div>
</template>

<script>

  import com1 from '@/components/com1'
  import com2 from '@/components/com2'

export default {
  name: 'Home',
    data:function(){
      return {
          com1Data: {name:'com1'},
          com2Data: {name:'com2'},
          val: ''
      }
    },
    methods:{
        emitcom1(val){
            this.val  = val
        },
    },
    components:{com1,com2}

}
</script>
